import request from '@/utils/request'
export function fetchSubjectList(depotId) {
  return request({
    url:'/subject/list/'+depotId,
    method:'get',
    //params:params
  })
}
export function createSubject(params) {
    return request({
      url:'/subject/create',
      method:'post',
      data:params
    })
}
export function updateSubject(id,params) {
    return request({
      url:'/subject/update/'+id,
      method:'post',
      data:params
    })
}
export function deleteSubject(id) {
    return request({
      url:'/subject/del/'+id,
      method:'get',
     // params:params
    })
}

export function getSubject(id) {
    return request({
      url:'/subject/detail/'+id,
      method:'get',
      //data:params
    })
}
export function bindProducts(id,ids) {
  return request({
    url:'/subject/bind/product/'+id,
    method:'post',
    data:ids
  })
}
//删除已绑定的商品
export function delbindedProducts(id,ids) {
  return request({
    url:'/subject/del/product/'+id,
    method:'post',
    data:ids
  })
}
export function getBindedProductList(id) {
  return request({
    url:'/subject/bind/product/list/'+id,
    method:'get',
    //data:ids
  })
}
// export function fetchSubjectCateList(params) {
//     return request({
//       url:'/subject/category/list',
//       method:'get',
//       data:params
//     })
//   }

// export function createSubjectCate(params) {
//     return request({
//       url:'/subject/category/create',
//       method:'post',
//       data:params
//     })
// }
// export function updateSubjectCate(id,params) {
//     return request({
//       url:'/subject/category/update/'+id,
//       method:'post',
//       params:params
//     })
// }
// export function delSubjectCate(id) {
//     return request({
//       url:'/subject/category/del/'+id,
//       method:'get',
//      // params:params
//     })
// }